package umacis.data.description;

import java.util.Vector;

import javax.microedition.rms.RecordStore;

import umacis.data.Bindings;
import umacis.lwuitcomponent.property.Properties;

public class ApplicationDescription {
	
	public class BinaryFile {

	}

	public class TextFile {

	}

	String lwuitResourceFileName = "";
	
	Vector setOfViewDescriptions = new Vector();
	
	int defaultFirstView;
	boolean startWithLastView;
	int lastView;
	boolean isEditable;
	
	Properties propertiesToImpose = new Properties();
	
	public Properties getPropertiesToImpose() {
		return propertiesToImpose;
	}

	//					init********************************
	public void loadFrom(RecordStore recordStore) {
		if (recordStore == null) return;
		
	}
	
	public void loadFrom(TextFile textFile) {
		
	}
	
	public void loadFrom(BinaryFile binaryFile) {
		
	}
	
	
//					methods*********************************************
	public void addViewDescription(ApplicationViewDescription viewDescription) {
		setOfViewDescriptions.addElement(viewDescription);
	}
	
	
	
	
//					getters and setters********************************
	public String getResourceFileName() {
		return lwuitResourceFileName;
		
	}

	public int getStartupViewIndex() {
		if (startWithLastView) return lastView;
		return defaultFirstView;
	}

	public int getNumberOfViewDescriptions() {
		return setOfViewDescriptions.size();
	}

}
